<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>输出100以内的所有质数</title>
</head>

<body>
    <script>
        for (var i = 2; i <= 100; i++) {
            for (var j = 2; j <= i - 1; j++) {
                if (i % j == 0) {
                    break;
                }
            }
            if (i == j) {
                document.write(j + '、');
            }
        }
    </script>
</body>

</html>